package com.keba.lamp.complaint.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.keba.basic.base.entity.Entity;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static com.keba.lamp.model.constant.Condition.LIKE;


/**
 * <p>
 * 实体类
 * 账户明细
 * </p>
 *
 * @author twg
 * @date 2025-05-15 20:30:52
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Builder
@TableName("account_detail")
public class AccountDetail extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    /**
     * 乐观锁
     */
    @TableField(value = "revision", condition = EQUAL)
    @Version
    private Integer revision;
    /**
     * 是否删除，0-未删除，1-删除
     */
    @TableField(value = "is_del", condition = EQUAL)
    private Integer isDel;
    /**
     * 流水号（唯一标识字符串）
     */
    @TableField(value = "code", condition = EQUAL)
    private String code;
    /**
     * 账户code
     */
    @TableField(value = "account_code", condition = LIKE)
    private String accountCode;
    /**
     * 账户类型（1：预付款账户）
     */
    @TableField(value = "account_type", condition = EQUAL)
    private Integer accountType;
    /**
     * 租户id
     */
    @TableField(value = "tenant_id", condition = EQUAL)
    private Long tenantId;
    /**
     * 金额
     */
    @TableField(value = "amount", condition = EQUAL)
    private BigDecimal amount;
    /**
     * 余额
     */
    @TableField(value = "balance", condition = EQUAL)
    private BigDecimal balance;
    /**
     * 业务类别（数据字典）
     */
    @TableField(value = "biz_type", condition = LIKE)
    private String bizType;
    /**
     * 类型（1：充值，2：消费，3：冲销）
     */
    @TableField(value = "type", condition = EQUAL)
    private Integer type;
    /**
     * 收支类型（1：收入，2：支出）
     */
    @TableField(value = "income_expense_type", condition = EQUAL)
    private Integer incomeExpenseType;
    /**
     * 案件id
     */
    @TableField(value = "case_id", condition = EQUAL)
    private Long caseId;
    /**
     * 业务创建时间
     */
    @TableField(value = "biz_time", condition = EQUAL)
    private LocalDateTime bizTime;
    /**
     * 入账时间
     */
    @TableField(value = "booking_time", condition = EQUAL)
    private LocalDateTime bookingTime;

    /**
     * 备注
     */
    @TableField(value = "remark", condition = LIKE)
    private String remark;

    @TableField(value = "biz_desc")
    private String bizDesc;


}
